
pdf(file="fig1.pdf", height=5, width=10)
par(mfrow=c(1,2), pty="s", mar=c(2,2,2,2))
theta1 <- c(0.2, 0.9)
theta2 <- c(0.75, -0.9)
z1 <- c(cos(0.1), sin(0.1))
z2 <- c(cos(1.0), sin(1.0))

plot(c(-1,1), c(-1,1), type="n", xlab="", ylab="")
abline(h=0)
abline(v=0)

arrows(x0=0, y0=0, x1=z1[1], y1=z1[2], col="blue3", length=0.075)
arrows(x0=0, y0=0, x1=theta1[1], y1=theta1[2], col="darkred", length=0.075)
arrows(x0=0, y0=0, x1=theta2[1], y1=theta2[2], col="darkred", length=0.075)

theta1.dist <- (theta1[1]*z1[1] + theta1[2]*z1[2]) 
theta2.dist <- (theta2[1]*z1[1] + theta2[2]*z1[2]) 

arrows(x0=theta1[1],
       y0=theta1[2],
       x1=theta1.dist*z1[1],
       y1=theta1.dist*z1[2], col="orangered1", length=0.075)
arrows(x0=theta2[1],
       y0=theta2[2],
       x1=theta2.dist*z1[1],
       y1=theta2.dist*z1[2], col="orangered1", length=0.075)

segments(x0=theta1.dist*z1[1],
         y0=theta1.dist*z1[2],
         x1=theta2.dist*z1[1],
         y1=theta2.dist*z1[2],
         col="cyan", lwd=1.1)

text(0.1, 0.95, expression(theta[j]), cex=0.95)
text(0.68, -.96, expression(theta[j*minute]), cex=0.95)
text(0.975, .225, expression(g(gamma[1])), cex=0.95)




plot(c(-1,1), c(-1,1), type="n", xlab="", ylab="")
abline(h=0)
abline(v=0)

arrows(x0=0, y0=0, x1=z2[1], y1=z2[2], col="blue3", length=0.075)
arrows(x0=0, y0=0, x1=theta1[1], y1=theta1[2], col="darkred", length=0.075)
arrows(x0=0, y0=0, x1=theta2[1], y1=theta2[2], col="darkred", length=0.075)

theta1.dist <- (theta1[1]*z2[1] + theta1[2]*z2[2]) 
theta2.dist <- (theta2[1]*z2[1] + theta2[2]*z2[2]) 

arrows(x0=theta1[1],
       y0=theta1[2],
       x1=theta1.dist*z2[1],
       y1=theta1.dist*z2[2], col="orangered1", length=0.075)
arrows(x0=theta2[1],
       y0=theta2[2],
       x1=theta2.dist*z2[1],
       y1=theta2.dist*z2[2], col="orangered1", length=0.075)

segments(x0=theta1.dist*z2[1],
         y0=theta1.dist*z2[2],
         x1=theta2.dist*z2[1],
         y1=theta2.dist*z2[2],
         col="cyan", lwd=1.1)

text(0.1, 0.95, expression(theta[j]), cex=0.95)
text(0.68, -.96, expression(theta[j*minute]), cex=0.95)
text(0.7, .88, expression(g(gamma[2])), cex=0.95)

dev.off()

